package com.kylinhunter.aop.pointcut;

import java.lang.reflect.Method;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.support.DynamicMethodMatcherPointcut;

import com.kylinhunter.aop.advice.ErrorPerformer;

public class ErrorDynamicPointcut extends DynamicMethodMatcherPointcut {
	private static final Log log = LogFactory.getLog(ErrorPerformer.class);
	@Override
	public boolean matches(Method method, Class targetClass)
	{
		return true;
	}
	@Override
	public boolean matches(Method method, Class class1, Object[] aobj) {
		// TODO Auto-generated method stub
		log.debug("method.getName():"+method.getName());
		if(method.getName().equals("execute"))return true;	 
		return false;
	}

}
